<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE HTML>
<html>
  <head> 
	<%@ include file="/platform/style.jsp"%>
	<style>
		
	</style>
	<script>
	function query(){
		$w.execForm()
	}
	function add(){
		window.parent.$w.openDialog({url:ctx+'/faretemp/FaretempPage@show.page',title:"添加运费模板",w:800,h:400,afterClose:function(re){
			if(re)$w.execForm();
		}});
	}
	function edit(id){
		window.parent.$w.openDialog({url:ctx+'/faretemp/FaretempPage@show.page?bean.id='+id,title:"修改运费模板",w:800,h:400,afterClose:function(re){
			if(re)$w.execForm();
		}});
	}
	function del(id){
		window.parent.$w.confirmMsg("确定删除？", function(r){
			if(r){
				$w.doUrl(ctx+"/faretemp/FaretempPage@del.page?bean.id="+id,{},function(json){
					query();
				})
			}
		})
	}
	</script>
  </head>
  
  <body class="easyui-layout">
	<div data-options="region:'center'" class="bodybg">
		<!-- 查询区域 -->
		<form id="queryForm" action="/faretemp/FaretempPage.page" method="post">
		<div class="easyui-panel ui-toolBar" border="false" data-options="doSize:false">
			<a href="javascript:;" class="easyui-linkbutton" iconCls="icon_add" plain="true" onclick="add()">添加运费模板</a>
		</div>
		<div class="ui_line" style="margin-top:10px"></div>
		<!-- 数据列表区域 -->
			<table class="ui-table" width="100%" cellpadding="1" cellspacing="1" data-options="showPage:false">
				<thead>
					<tr class="ui_th">
						<td width="35">ID</td>
						<td width="120">模板名称</td>
						<td width="90">运送方式</td>
						<td>运送到</td>
						<td width="90">首件（个）</td>
						<td width="90">首运费（元）</td>
						<td width="90">续件（个）</td>
						<td width="90">续运费（元）</td>
						<td width="110" align="center">操作</td>
					</tr>
				</thead>
				<tbody>
				<w:iterate id="info" bind="resultList_">
					<tr class="ui_td">
						<td><w:write bind="#info.id"/></td>
						<td><w:write bind="#info.name"/></td>
						<td><w:write bind="#info.way" format="[,物流]"/></td>
						<td>
						<w:iterate bind="#info.arealist" id="area">
						<w:write bind="#area.province"/><w:write bind="#area.city"/>,
						</w:iterate>
						</td>
						<td><w:write bind="#info.startnum"/></td>
						<td><w:write bind="#info.startmoney"/></td>
						<td><w:write bind="#info.nextnum"/></td>
						<td><w:write bind="#info.nextmoney"/></td>
						<td align="center">
							<a href="javascript:void(0);" class="ui_btn marginR8" onclick="edit(<w:write bind="#info.id"/>)">修改</a><a href="javascript:void(0);" class="ui_btn" onclick="del(<w:write bind="#info.id"/>)">删除</a>
						</td>
					</tr>
				</w:iterate>
				</tbody>
			</table>
		</form>
	</div>
  </body>
</html>
